package com.aspose.cells;

class zaxh extends zawe {
   private zagu g;
   private int h;
   private int i;
   private int j;
   private int k;
   private int l;
   private int m;
   private boolean n;
   private boolean o;

   public zaxh(zagu var1, zagu var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, boolean var10, boolean var11) {
      super(var3, var2, var8, var9, var10, var11);
      this.g = var1;
      this.h = var4;
      this.i = var5;
      this.j = var4 * var5;
      this.k = var6;
      this.l = var7;
      this.C();
      this.o = true;
   }

   zaxh(zaxh var1) {
      super(var1.b, var1.a, var1.e, var1.f, var1.c, var1.d);
      this.g = var1.g;
      this.h = var1.h;
      this.i = var1.i;
      this.j = var1.j;
      this.k = var1.k;
      this.l = var1.l;
      this.m = var1.m;
      this.n = var1.n;
      this.o = var1.o;
   }

   public zahn b(zaay var1) {
      return new zaxh(this);
   }

   public int c() {
      return this.h;
   }

   public int d() {
      return this.i;
   }

   public int e() {
      return this.j;
   }

   public boolean l() {
      return this.h == 1 && this.i == 1;
   }

   public boolean m() {
      return this.h == 1;
   }

   public boolean n() {
      return this.i == 1;
   }

   public int b() {
      return this.b;
   }

   public zagu a(int var1, int var2) {
      return !this.n && var1 == this.k && var2 == this.l ? this.g : this.a;
   }

   public void f() {
      if (!this.n) {
         this.o = false;
      }
   }

   public boolean b(int var1, int var2) {
      if (this.n) {
         return false;
      } else {
         this.o = true;
         return var1 < this.k || var1 == this.k && var2 <= this.l;
      }
   }

   public boolean a(int var1) {
      if (this.n) {
         return false;
      } else if (var1 <= this.m) {
         this.o = false;
         return true;
      } else {
         return false;
      }
   }

   public boolean g() {
      if (this.o) {
         return false;
      } else {
         this.o = true;
         return true;
      }
   }

   public zagu h() {
      return this.g;
   }

   public int i() {
      return this.k;
   }

   public int j() {
      return this.l;
   }

   public int k() {
      return this.m;
   }

   public zahn b(int var1) {
      if (this.h == 1) {
         return this;
      } else {
         return (zahn)(var1 != this.k ? new zawz(this.a, this.b, 1, this.i) : new zaxh(this.g, this.a, this.b, 1, this.i, 0, this.l, this.e, this.f, false, false));
      }
   }

   public zahn c(int var1) {
      if (this.i == 1) {
         return this;
      } else {
         return (zahn)(var1 != this.l ? new zawz(this.a, this.b, this.h, 1) : new zaxh(this.g, this.a, this.b, this.h, 1, this.k, 0, this.e, this.f, false, false));
      }
   }

   public void a(zaay var1) {
      if (this.c) {
         if (var1.g != this.e) {
            this.k -= var1.g - this.e;
            this.e = var1.g;
         }

         if (this.d && var1.h != this.f) {
            this.l -= var1.h - this.f;
            this.f = var1.h;
         }

         this.C();
      } else if (this.d && var1.h != this.f) {
         this.l -= var1.h - this.f;
         this.f = var1.h;
         this.C();
      }

   }

   public boolean q() {
      return true;
   }

   public int s() {
      return this.n ? -1 : this.k;
   }

   public int r() {
      return this.n ? -1 : this.k;
   }

   public int u() {
      return this.n ? -1 : this.l;
   }

   public int t() {
      return this.n ? -1 : this.l;
   }

   private void C() {
      if (this.k >= 0 && this.l >= 0 && this.h > this.k && this.i > this.l) {
         this.m = this.k * this.i + this.l;
         this.n = false;
      } else {
         this.n = true;
         this.m = -1;
      }

   }
}
